package com.atguigu.service.impl;

import com.atguigu.dao.DeliveryDao;
import com.atguigu.dao.impl.DeliveryDaoImpl;
import com.atguigu.pojo.Delivery;
import com.atguigu.pojo.DeliveryList;
import com.atguigu.service.DeliveryService;

import java.util.List;

public class DeliveryServiceImpl implements DeliveryService {
    static final DeliveryDao deliveryDao = new DeliveryDaoImpl();
    @Override
    public List<DeliveryList> getAllDeliverysById(Integer id) {
        return deliveryDao.getAllDeliveryById(id);
    }

    @Override
    public void removeDeliveryById(Integer id) {
        deliveryDao.removeDeliveryById(id);
    }

    @Override
    public Delivery addDelivery(String username, Integer id, Integer companyId, String phone, String address, String date, Integer status) {
        return deliveryDao.addDelivery(username, id, companyId, phone, address, date, status);
    }

    @Override
    public Delivery getDeliveryById(Integer integer) {
        return deliveryDao.getDeliveryById(integer);
    }

    @Override
    public void updateDeliveryById(Integer integer,String deliveryName,Integer companyId,String phone,String address,String date,Integer status) {
        deliveryDao.updateDeliveryById(integer,deliveryName,companyId,phone,address,date,status);
    }


}
